//
//  LBStatisticsTaskData.h
//  LBStatistics
//
//  Created by WuShiHai on 19/5/24.
//  Copyright (c) 2019 Lebbay. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef NS_ENUM(NSInteger, LBStatisticsTaskType) {
    LBStatisticsTaskTypeDefault = 0, //打点统计
    LBStatisticsTaskTypeAd, //渠道统计
};

@interface LBStatisticsTaskData : NSObject

@property (nonatomic, assign) LBStatisticsTaskType type;
/**返回的数据库主键id，现在改成失败后才会入库*/
@property (nonatomic, assign) NSInteger taskIdentifier;

/** 服务器地址 */
@property (nonatomic, copy) NSString *url;
/** 重试参数 */
@property (nonatomic, copy) NSString *params;

/** 任务失败的次数 */
@property (nonatomic, assign) NSInteger failCount;

/** 对应渠道统计中的四种action*/
@property (nonatomic, copy) NSString *action;


/**
 *  实例化一个上传任务
 *
 *  @param url    url
 *  @param params 传递参数
 *  @param type 类型
 */
- (instancetype)initWithURL:(NSString *)url params:(NSString *)params type:(LBStatisticsTaskType)type action:(NSString *)action;
@end
